﻿@using GC_RF.Domain.Enums
@using GC_RF.Site.Resources
@model GC_RF.Site.Models.Shared.InformationMessageModel
@{
	ViewBag.Title = Model != null && !string.IsNullOrWhiteSpace(Model.Title) ? Model.Title : "Информация";
}

@if (Model != null)
{
	<div class="info-msg">
		<img src="@(!string.IsNullOrWhiteSpace(Model.ImageUrl) ? Model.ImageUrl : StaticResources.WarningImageUrl)" />
		@if (Model.Text != null)
		{
			foreach (var item in Model.Text.Where(item => !string.IsNullOrWhiteSpace(item)))
			{
				<h1 @Html.Raw(string.Format(
					"class='{0}'",
					Model.TextType == MessageType.Warning
						? "text-danger"
						: Model.TextType == MessageType.Info
							? "text-primary"
							: "text-success"))>
					@item
				</h1>
			}
		}
	</div>
}
